package com.atguigu.strategy.improve;

public class ToyDuck extends Duck {
	
	public ToyDuck() {
		flyBehavior = new NoFlyBehavior();
	}

	@Override
	public void display() {
		System.out.println("toy duck");
	}
	
	//重新父类的所有方法
	@Override
	public void quack() {
		System.out.println("toy鸭子不会叫");
	}
	
	@Override
	public void swim() {
		System.out.println("toy鸭子不会游泳");
	}
	
}
